

package com.hazelcast.map.metrics;

import com.hazelcast.config.IndexConfig;
import com.hazelcast.config.IndexType;

import java.util.List;

/**
 * Used for IMap value type when testing indexing metrics
 */
record User(String userId, String name) {
    /**
     * @return Config for an index on the "userId" field of a {@link User} record
     */
    static IndexConfig getIndexConfigOnUserId() {
        return new IndexConfig().setName("testIndex").setAttributes(List.of("userId")).setType(IndexType.HASH);
    }
}
